import _imports  # 只在此项目有效，其他项目，请去掉此 import
import pybi as pbi
import pandas as pd
from src.data.dataset import load_df


charts = pbi.easy_echarts


df = load_df("省市区销量.xlsx")

data = pbi.set_source(df)

opts = (
    charts.make_bar(data, x="省", y="销量")
    + charts.make_pie(data, name="市", value="销量")
    + charts.make_line(data, x="区", y="销量")
)

pbi.add_echart(opts)
pbi.add_table(data)

pbi.to_html("test.html")
